/* Book Management */
var currentShown = null;

function showSettings(id)
{
	// If an existing author currently has it's settings being shown it must be hidden
	if (currentShown != null)
	{
		// Hide settings for the existing element
		hideSettings(currentShown);
	}
	
	// Show the settings for the seleted element
	document.getElementById("Book_" + id + "_Actions").className = "actions";
	
	// Set the currently shown settings id
	currentShown = id;
}

function hideSettings(id)
{
	// Hide the settings
	document.getElementById("Book_" + id + "_Actions").className = "actions hide";
}

/* Adding a Book */
function checkAddBook()
{
	if (document.getElementById("authorBox").value != "selectauthor")
		return true;
	else
	{
		document.getElementById("authorspan").className = "show";
		return false;	
	}
}